package com.jch.helloworld.configBeans;

public class DemoBeans {

    private String attr0;
    private int attr1;
    private double attr2;
    private char attr3;

    public DemoBeans() {
//        System.out.println("调用: 无参构造器。");
    }

    public DemoBeans(String attr0, int attr1, double attr2) {
//        System.out.println("调用有参构造器：DemoBeans(String attr0, int attr1, double attr2)");
        this.attr0 = attr0;
        this.attr1 = attr1;
        this.attr2 = attr2;
    }

    public DemoBeans(String attr0, int attr1, char attr3) {
//        System.out.println("调用有参构造器：DemoBeans(String attr0, int attr1, char attr3)");
        this.attr0 = attr0;
        this.attr1 = attr1;
        this.attr3 = attr3;
    }

    public void setAttr0(String attr0) {
//        System.out.println("使用setter方法设置attr0的值。");
        this.attr0 = attr0;
    }

    public void setAttr1(int attr1) {
        this.attr1 = attr1;
    }

    @Override
    public String toString() {
        return "DemoBeans{" +
                "attr0='" + attr0 + '\'' +
                ", attr1=" + attr1 +
                ", attr2=" + attr2 +
                ", attr3=" + attr3 +
                '}';
    }
}
